Skip to content

test: add plugins and categories to lint settings#26

Merged
fengmk2 merged 1 commit intomasterfrom
fix-lint
Aug 8, 2025
Merged

test: add plugins and categories to lint settings#26
fengmk2 merged 1 commit intomasterfrom
fix-lint

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Aug 8, 2025

No description provided.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @fengmk2, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

I've updated the .oxlintrc.json configuration file to enhance our linting setup. This change introduces specific linting categories and integrates several essential plugins, aiming to improve code quality and consistency across the project.

Highlights

  • Linting Categories Configuration: I've added a new "categories" object to .oxlintrc.json, setting various linting categories such as "correctness", "perf", "nursery", "restriction", "style", "pedantic", and "suspicious" to an "error" level. This ensures stricter enforcement of code quality rules.
  • Oxlint Plugin Integration: I've also introduced a "plugins" array in .oxlintrc.json, incorporating a suite of plugins including "import", "typescript", "unicorn", "jsdoc", "node", "promise", and "oxc". These plugins will extend Oxlint's capabilities for more comprehensive code analysis.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Aug 8, 2025

Open in StackBlitz

npm i https://pkg.pr.new/eggjs/koa/@eggjs/koa@26

commit: b3ebc60

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the oxlint configuration by enabling several rule categories and plugins. While this is a good step towards improving code quality, enabling some of the more opinionated and experimental categories like nursery, pedantic, and restriction at the 'error' level might be too strict and could cause unnecessary friction. I've suggested a more conservative approach for these categories.

Comment on lines +7 to +15
"categories": {
"correctness": "error",
"perf": "error",
"nursery": "error",
"restriction": "error",
"style": "error",
"pedantic": "error",
"suspicious": "error"
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Enabling the nursery, restriction, and pedantic categories with "error" severity might be too aggressive and could lead to a lot of linting noise.

  • nursery: These rules are experimental and may not be stable. They could change or be removed in future versions.
  • pedantic: These rules are often very stylistic or opinionated. It's usually better to discuss and enable them individually.
  • restriction: These rules disallow certain language features. Enabling the whole category can be overly restrictive without a team-wide agreement.

Consider setting these to "warn" or starting without them and enabling specific rules as needed. This will help focus on the most critical issues first.

  "categories": {
    "correctness": "error",
    "perf": "error",
    "nursery": "warn",
    "restriction": "warn",
    "style": "error",
    "pedantic": "warn",
    "suspicious": "error"
  },

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.05%. Comparing base (0866329) to head (b3ebc60).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #26   +/-   ##
=======================================
  Coverage   98.05%   98.05%           
=======================================
  Files           5        5           
  Lines        2059     2059           
  Branches      220      220           
=======================================
  Hits         2019     2019           
  Misses         40       40           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fengmk2 fengmk2 changed the title test: add plugins and categories settings test: add plugins and categories to lint settings Aug 8, 2025
@fengmk2 fengmk2 merged commit 0b44adc into master Aug 8, 2025
14 checks passed
@fengmk2 fengmk2 deleted the fix-lint branch August 8, 2025 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant